/*
 * $Id: LoggerInterfaceDescriptor.java 114 2013-01-16 07:33:27Z vladimirow@mail.ru $
 * $HeadURL: http://ultralog.googlecode.com/svn/ultralog/tags/release-0.1/src/java/com/google/code/ultralog/factory/LoggerInterfaceDescriptor.java $
 *
 * This file is a part of ultralog project (http://code.google.com/p/ultralog/).
 * Released under New BSD License.
 */
package com.google.code.ultralog.factory;

import java.lang.reflect.Field;
import java.lang.reflect.Method;


/**
 * Describes logger interface.
 *
 * @author Mikhail Vladimirov
 */
public interface LoggerInterfaceDescriptor
{
    /**
     * Get number of log levels defined for the logger interface.
     *
     * @return number of log levels
     */
    public int getLogLevelCount ();

    /**
     * Get logging level descriptor with given index.
     *
     * @param index logging level index
     * @return logging level descriptor.
     */
    public LogLevelDescriptor getLogLevelAt (int index);

    /**
     * Get number of log level checkers defined in the interface.
     *
     * @return number of log level checkers
     */
    public int getLogLevelCheckerCount ();

    /**
     * Get logging level checker descriptor with given index.
     *
     * @param index logging level checker descriptor index
     * @return logging level checker descriptor
     */
    public LogLevelCheckerDescriptor getLogLevelCheckerAt (int index);

    /**
     * Get number of log messages defined for the logger.
     *
     * @return number of log messages
     */
    public int getLogMessageCount ();

    /**
     * Get log message descriptor with given index.
     *
     * @param index log message descriptor index
     * @return log message descriptor with given index
     */
    public LogMessageDescriptor getLogMessageAt (int index);

    /**
     * Describes logging level defined for logger interface.
     */
    public interface LogLevelDescriptor
    {
        /**
         * Get field the logging level is defined by.
         *
         * @return field
         */
        public Field getField ();

        /**
         * Get logging level name.
         *
         * @return level name
         */
        public String getName ();

        /**
         * Get logging level.
         *
         * @return logging level
         */
        public int getLevel ();
    }

    /**
     * Describes logging level checker defined for logger interface.
     */
    public interface LogLevelCheckerDescriptor
    {
        /**
         * Get logging level checker method.
         *
         * @return method
         */
        public Method getMethod ();

        /**
         * Get logging level to be checked.
         *
         * @return logging level
         */
        public int getLevel ();
    }

    /**
     * Describes logging level checker defined for logger interface.
     */
    public interface LogMessageDescriptor
    {
        /**
         * Get method the log message is defined by.
         *
         * @return method
         */
        public Method getMethod ();

        /**
         * Get logging level for the message.
         *
         * @return level
         */
        public int getLevel ();

        /**
         * Get log message template.
         *
         * @return template
         */
        public String getTemplate ();
    }
}
